﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using IntroMVC4.Common;

namespace IntroMVC4
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            //routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            //routes.Add("AnnaKids_domain", new DomainRoute(
            //    "annakidsshop.net",                                     // Domain with parameters
            //    "{area}/{controller}/{action}/{id}",                                        // URL with parameters
            //    new { area = "AnnaKids", controller = "HomeAN", action = "Index", id = UrlParameter.Optional }  // Parameter defaults,
            //));
            ////routes.Add("AnnaKids_domain1", new DomainRoute(
            ////    "annakidsshop.net",                                     // Domain with parameters
            ////    "",                                        // URL with parameters
            ////    new { area = "AnnaKids", controller = "TrangChu", action = "Index", id = UrlParameter.Optional }  // Parameter defaults
            ////));
            //routes.Add("BinhMinh_domain", new DomainRoute(
            //    "binhminhhotel1.net",                                     // Domain with parameters
            //    "{area}/{controller}/{action}/{id}",                                        // URL with parameters
            //    new { area = "BinhMinh", controller = "TrangChu", action = "Index", id = UrlParameter.Optional }  // Parameter defaults
            //));
            ////routes.Add("BinhMinh_domain1", new DomainRoute(
            ////    "binhminhhotel1.net",                                     // Domain with parameters
            ////    "",                                        // URL with parameters
            ////    new { area = "BinhMinh", controller = "TrangChu", action = "Index", id = UrlParameter.Optional }  // Parameter defaults
            ////));
            AreaRegistration.RegisterAllAreas();
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new[] { "IntroMVC4.Controllers" }
            );
        }
    }
}